home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / prog_c / lzw4w10.zip / SAYERROR.C < prev    next >
Text File  |  1994-06-18  |  1KB  |  50 lines

  1. /* sayerror.c */
  2.  
  3. #include <windows.h>
  4. #include <stdio.h>
  5. #include "LZW4W.H"
  6. #include "SAYERROR.H"
  7.  
  8. static char Text[25];
  9.  
  10. void SayError(HWND hWnd,int Code)
  11. {switch(Code)
  12.   {case EXPANSION_ERROR:
  13.      MessageBox(hWnd,
  14.                "Can only expand a previously compressed file",
  15.                "Expansion Error",
  16.                MB_ICONEXCLAMATION);
  17.      break;
  18.    case CANNOT_ALLOCATE:
  19.      MessageBox(hWnd,
  20.                 "Could not allocate sufficient memory",
  21.                 "Allocation Error",
  22.                 MB_ICONEXCLAMATION);
  23.      break;
  24.    case INTERNAL_ERROR:
  25.      MessageBox(hWnd,
  26.                 "LZW4W object code modified !",
  27.                 "Internal Error",
  28.                 MB_ICONEXCLAMATION);
  29.      break;
  30.    case NOT_INITIALIZED:
  31.      MessageBox(hWnd,
  32.                 "Must call InitLZW first",
  33.                "Not Initialized Error",
  34.                 MB_ICONEXCLAMATION);
  35.      break;
  36.    case BAD_BITCODE:
  37.      MessageBox(hWnd,
  38.                 "Must be 12, 13, or 14",
  39.                 "Bit Code Error",
  40.                 MB_ICONEXCLAMATION);
  41.      break;
  42.    default:
  43.      wsprintf(Text,"%d [%xH]",Code,Code);
  44.      MessageBox(hWnd,
  45.                 Text,
  46.                 "Unknown Error",
  47.                 MB_ICONEXCLAMATION);
  48.      break;
  49.   }
  50. }